package com.board.form;
//用户评价订单
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.web.multipart.MultipartFile;

import javax.validation.Valid;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;

@Data
@ApiModel("用户评价订单参数对象")
public class UserCommentForm {
    @ApiModelProperty("订单编号")
    @NotNull(message = "订单编号不能为空")
    private String orderNum;
    @ApiModelProperty("评价等级")
    @NotNull(message = "评价等级不能为空")
    @Min(value = 1,message = "评价等级不能小于1")
    @Max(value = 5,message = "评价等级不能大于5")
    private Integer level;
    @ApiModelProperty("评价内容")
    @NotNull(message = "评价内容不能为空")
    private String cotent;
    @ApiModelProperty("是否匿名")
    @NotNull(message = "是否匿名不能为空")
    @Min(value = 0,message = "是否匿名不能小于0")
    @Max(value = 1,message = "是否匿名不能大于1")
    private Integer isAnnoy;
    @ApiModelProperty("评价图片")
    @Valid
    @Size(min = 0,max = 3,message = "评价图片最多为3张")
    private List<String> commentImg;
    @ApiModelProperty("订单类型")
    @NotNull(message = "订单类型不能为空")
    private Integer orderType;
}
